<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <title>Document</title>
    <style>
        img {
            width: 250px;
            height: 150px;
        }
    </style>
</head>
<body>
    
    <div id="app">
        <img :src="imgurl" alt="">
    </div>

    <script>
        new Vue({
            el: "#app",
            data:{
                imgurl:"./a.jpg",
                imgs:["./a.jpg","./b.jpg"],
                current:0
            },
            mounted(){
                setInterval(() => {
                    this.imgurl = this.imgs[this.current]
                    if(this.current < 1){
                        this.current++
                    }else{
                        this.current = 0
                    }
                },1000)
            }


        })
    </script>
</body>
</html>